package com.arpa.wms.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Digits;
import java.math.BigDecimal;


/**
 * <p>
 * 包装材料
 * </p>
 *
 * @author rfwang
 * @since 2021-08-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("wms_packing_material")
@ApiModel(value="PackingMaterial对象", description="包装材料")
public class PackingMaterial extends BasicEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "包材编码")
    @TableField("code")
    @Length(max = 100, message = "包材编码长度不能大于100", groups = {Save.class,Update.class})
    private String code;

    @ApiModelProperty(value = "所属机构code")
    @TableField("group_code")
    private String groupCode;

    @ApiModelProperty(value = "包材名称")
    @TableField("name")
    @Length(max = 100, message = "包材名称长度不能大于100", groups = {Save.class,Update.class})
    private String name;

    @ApiModelProperty(value = "包材容积")
    @TableField("volume")
    @Digits(integer = 20,fraction = 6, groups = {Save.class, Update.class})
    private BigDecimal volume;

    public interface Save{}

    public interface Update{}



}
